The JVT/H.264/MPEG AVC (“JVT”) standard allows the encoding of both progressive and interlaced video sequences, and supports three different picture coding modes. Turning to FIGS. 1A through 1C, picture coding types within H.264 are generally indicated by the reference numerals 110, 120, and 130. In particular, a frame coding type is generally indicated by the reference numeral 110, a field coding type is generally indicated by the reference numeral 120, and an macroblock (MB) adaptive frame/field coding type is generally indicated by the reference numeral 130.
In frame-based coding 110, a picture is created by interleaving both top and bottom lines. In field-based coding 120, an interlaced frame is separated into top and bottom fields, and each field is coded separately. The standard also supports the secondary frame mode referred to as Macroblock Adaptive Frame/Field coding (MBAFF) mode, where the frame is partitioned in 16×32 Super-Macroblocks. These partitions essentially include 2 macroblocks (MBs) that are both coded in either field or frame mode. It is also possible to combine either one of the two frame picture coding modes (normal or MBAFF) with field pictures, which provides additional flexibility and improved performance at the encoder. This, nevertheless, requires that the encoder have the capability to adaptively select which picture coding mode is to be used (Picture Adaptive Frame/Field Coding—PAFF).
In general, for interlaced frames with rapid motion, it may be more efficient to compress each field separately. On the other hand, if a frame includes both moving regions and static regions, then it is usually more efficient to code the moving region in field mode and static regions in frame mode using MBAFF coding.
The picture level frame and field coding (PAFF) and macroblock level frame and field coding (MBAFF) tools were adopted by the H.264 video coding standard into the Main and Extended profiles for improving coding efficiency for interlaced sequences. PAFF decision is used to decide whether or not the current interlaced frame, which includes two complementary fields, should be coded as a single frame (frame mode), or as two separately coded fields (field mode). MBAFF decision, on the other hand, is used within a special structured frame mode that includes 16×32 Super-Macroblocks (Super-MBs), i.e., a pair of vertically adjacent macroblocks, to decide whether a Super-MB is to be coded in field mode or frame mode.
Hence, multiple combinations for coding an interlaced sequence are possible. More specifically, each frame may be coded as either a single non-interlaced frame without Super-MB partitioning or as two complementary fields (PAFF mode). A second option is to code the entire sequence in MBAFF mode, where each frame is coded as a single frame which includes a frame of field Super-MB partitions (MBAFF mode). Finally, it is possible to also combine the above two decisions, where a frame can be either coded as a single frame comprised of frame or field Super-MB partitions or as two complementary fields (PAFF+MBAFF).
In the JVT reference software, a multi-pass approach is used to decide the coding mode. If PAFF is used, then a frame will be first coded in both frame and field mode. The final mode will be selected as the one that leads to the smallest Lagrangian distortion J=D+λR, where D is distortion, R is the rate, and λ is the Lagrange multiplier. Similarly, if MBAFF is used, then each Super-MB partition (i.e. a group of 2 vertically adjacent MBs), will be first coded in both frame and field mode. The final mode for this Super-MB is again selected as the one with the smallest Lagrangian distortion. Finally, if PAFF+MBAFF are both considered, then the encoding process can be seen as a combination of the above PAFF and MBAFF coding methods, that is, the frame is first coded in frame mode using MBAFF, where each Super-MB will be coded in either field or frame mode based on the previously described MBAFF decision. The same frame will also be coded as two separate fields, and the final coding mode (MBAFF frame vs. Field) will be decided based on the PAFF decision.
The adoption of these tools provides more flexibility for coding interlaced sequences, although, on the other hand, considerably increases complexity.
Accordingly, it would be desirable and highly advantageous to have a method and apparatus for fast and/or lower complexity PAFF and MBAFF decision.